<template>
    <div class="mars-m-style">
        <van-cell-group title="物品管理">
            <van-grid :column-num="5" :border="false">
                <van-grid-item icon="photo-o" text="物品分类" @click="toPage(1)"/>
                <van-grid-item icon="todo-list-o" text="物品列表" @click="toPage(2)"/>
                <van-grid-item icon="todo-list-o" text="申领列表" @click="toPage(3)"/>
            </van-grid>
        </van-cell-group>
        <van-cell-group title="人事管理">
            <van-grid :column-num="5" :border="false">
                <van-grid-item icon="photo-o" text="人事调动" @click="toPage(4)"/>
                <van-grid-item icon="todo-list-o" text="工资查询" @click="toPage('salary')"/>
                <van-grid-item icon="todo-list-o" text="个人工资" @click="toPage('personalSalary')"/>
                <van-grid-item icon="todo-list-o" text="请假管理" @click="toPage('qingjia')"/>
                <van-grid-item icon="todo-list-o" text="加班列表" @click="toPage('jiaban')"/>
                <van-grid-item icon="todo-list-o" text="合同列表" @click="toPage('contract')"/>
                <van-grid-item icon="todo-list-o" text="证照列表" @click="toPage('zhengzhao')"/>
                <van-grid-item icon="todo-list-o" text="护照列表" @click="toPage('huzhao')"/>
                <van-grid-item icon="todo-list-o" text="培训列表" @click="toPage('peixun')"/>
                <van-grid-item icon="todo-list-o" text="个人档案" @click="toPage('personal')"/>
                <van-grid-item icon="todo-list-o" text="假期详细" @click="toPage('jiaqi')"/>
            </van-grid>
        </van-cell-group>
        <van-cell-group title="延期支付">
            <van-grid :column-num="5" :border="false">
                <van-grid-item icon="photo-o" text="赔付明细" @click="toPage('peifu')"/>
                <van-grid-item icon="todo-list-o" text="兑付明细" @click="toPage('duifu')"/>
                <van-grid-item icon="todo-list-o" text="延付明细" @click="toPage('yanfu')"/>
                <van-grid-item icon="todo-list-o" text="延付台账" @click="toPage('yanfutaizhang')"/>
            </van-grid>
        </van-cell-group>
        <van-cell-group title="固定资产">
            <van-grid :column-num="5" :border="false">
                <van-grid-item icon="photo-o" text="测试记录" @click="toPage('test')"/>
                <van-grid-item icon="todo-list-o" text="个人资产" @click="toPage('alone')"/>
                <van-grid-item icon="todo-list-o" text="设备盘点" @click="toPage('aloneInventory')"/>
                <van-grid-item icon="todo-list-o" text="新建盘点" @click="toPage('newInventory')"/>
                <van-grid-item icon="todo-list-o" text="扫一扫" @click="toPage('saoma')"/>
            </van-grid>
        </van-cell-group>
    </div>
</template>

<script>
import * as dd from "dingtalk-jsapi";
import {Config} from "@/config/formDataOptions";
import {API_URL} from "@/config/urlInfo";

export default {
    name: "index",
    methods: {
        toPage(key) {

            let urls = {
                "1": "/mobile/offices/list",
                "2": "/mobile/offices/articleList",
                "3": "/mobile/offices/claim/articleClaimList",
                "4": "/hr-mobile/transferList",
                "qingjia": "/hr-mobile/leaveList",
                "jiaban": "/hr-mobile/overTimeList",
                "contract": "/hr-mobile/contractList",
                "zhengzhao": "/hr-mobile/licenseList",
                "huzhao": "/hr-mobile/passportList",
                "salary": "/hr-mobile/salaryList",
                "peifu": "/hr-mobile/payBackList",
                "duifu": "/hr-mobile/duifuList",
                "yanfu": "/hr-mobile/yanfuList",
                "yanfutaizhang": "/hr-mobile/yanfutaizhang",
                "peixun": "/hr-mobile/recordingList",
                "personal": "/hr-mobile/personalInfo",
                "jiaqi": "/hr-mobile/leaveInfo",
                // "test": "/assets-mobile/testView",
                "test": "/test",
                "alone": "/assets-mobile/alonePerson",
                "aloneInventory": "/assets-mobile/aloneInventory",
                "newInventory": "/assets-mobile/newInventory",
                "saoma": "/assets-mobile/saoma",
                "personalSalary": "/hr-mobile/personalSalary",

            };
            let path = urls[key];
            if (path) {
                this.$router.push(path);
            }
        }
    }
}
</script>

<style scoped>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>
